async function showModal(url, options, params) {
    let firstWindow = top.frames[0]
    let dialogOptions = {
        width: 1000,
        height: 600,
        left: '0px',
        top: '0px',
        resizable: true,
		maximize: true,
        extStyle: ''
    }
    $.extend(dialogOptions, options);
    let pWidth = firstWindow.innerWidth
    let pHeight = firstWindow.innerHeight
    if (pWidth > dialogOptions.width) {
        dialogOptions.left = (pWidth - dialogOptions.width) / 2 + 'px'
    }
    if (pHeight > dialogOptions.height) {
        dialogOptions.top = (pHeight - dialogOptions.height) / 2 + 'px'
    }
    let styles = 'border-width: 2px;border-color: rgb(38, 113, 158);overflow: hidden;padding:0px;margin:0px;background:none;max-width:100%;max-height:100%;'
    styles = styles + 'width:' + dialogOptions.width + 'px;'
    styles = styles + 'height:' + dialogOptions.height + 'px;'
    styles = styles + 'top:' + dialogOptions.top + ';'
    styles = styles + 'left:' + dialogOptions.left + ';'
    styles = styles + dialogOptions.extStyle;
    let res = await firstWindow.showModalDialog(url, params, styles, dialogOptions.resizable,dialogOptions.maximize);
    return res;
}

$(function(){
    $(document).keydown(function(e){
        if(13===e.keyCode && typeof doSearchCommon1 === 'function'){
                doSearchCommon()
        }else if(13 === e.keyCode){
            $('.doEnter').click()
		}
	});
})